﻿using System;
using System.Collections.Generic;

namespace Mercenary
{
	public class StraPvpNormal : IStrategy
	{
		public static string m_name = UiItemConst.策略_PVP通用.m_name;
		public static int m_mercMax = 6;
		public List<MercCard> m_mercList = new List<MercCard>();

		public string Name() { return m_name; }

		public List<MercCard> GetMercList() { return m_mercList; }

		public (int hand_index, int play_index) GetEnterOrder(
			List<MercCard> hand_mercenaries,
			List<MercCard> play_mercenaries)
		{
			int mid = UtilsStra.FindMercenaryIndexForName("鞭笞者特里高雷", play_mercenaries);
			if (UtilsStra.FindSpecNameTarget("鞭笞者特里高雷", play_mercenaries) != null)
				mid = UtilsStra.FindMercenaryIndexForName("鞭笞者特里高雷", play_mercenaries);
			else if (UtilsStra.FindSpecNameTarget("变装大师", play_mercenaries) != null)
				mid = UtilsStra.FindMercenaryIndexForName("变装大师", play_mercenaries);
			if (mid == 0)
				return (0, mid);
			else if (mid > 0)
				return (0, mid + 1);
			return (0, play_mercenaries.Count);
		}

		public void UpdateMercList()
		{
			m_mercList.Clear();
		}

		public List<BattleTarget> GetBattleTargets(
			int turn,
			List<MercCard> targets_opposite_all,
			List<MercCard> targets_friendly_all,
			List<MercCard> targets_opposite_graveyrad)
		{
			List<BattleTarget> list = new List<BattleTarget>();
			var targets_opposite_valid = targets_opposite_all.FindAll(
				(MercCard t) => t.m_enable == true);
			var targets_friendly = targets_friendly_all.FindAll(
				(MercCard t) => t.m_enable == true);

			try
			{
				foreach (var merc_iter in targets_friendly_all)
				{
					//*********************************************奥术龙策略****************************************//
					if (merc_iter.m_name == "奈法利安")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"梦魇毒蛇","安娜科德拉", "周卓","玛法里奥·怒风","古夫·符文图腾",
							"沃金","魔像师卡扎库斯","艾萨拉女王","恩佐斯","希尔瓦娜斯·风行者",
							"伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						focusTargets.Add(UtilsStra.FindMinHealthTarget(targets_opposite_valid));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("龙人突袭", merc_iter)?.m_id ?? -1,
							m_skillName = "龙人突袭",
						});
					}
					else if (merc_iter.m_name == "鞭笞者特里高雷")
					{
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("反冲", merc_iter)?.m_id ?? -1,
							m_skillName = "反冲",
						});
					}
					else if (merc_iter.m_name == "雷诺·杰克逊")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"梦魇毒蛇", "安娜科德拉",
							"沃金",
							"吉安娜·普罗德摩尔", "冰雪之王洛克霍拉",
							"米尔豪斯·法力风暴" , "安东尼达斯"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("宝藏是我的", merc_iter)?.m_id ?? -1,
							m_skillName = "宝藏是我的",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("傲人肌肉", merc_iter)?.m_id ?? -1,
							m_skillName = "傲人肌肉",
						});
					}
					else if (merc_iter.m_name == "奥妮克希亚")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"梦魇毒蛇","安娜科德拉", "周卓","玛法里奥·怒风",
							"沃金","魔像师卡扎库斯","艾萨拉女王","恩佐斯","希尔瓦娜斯·风行者",
							"伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("深呼吸", merc_iter)?.m_id ?? -1,
							m_skillName = "深呼吸",
						});
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("清理巢穴", merc_iter)?.m_id ?? -1,
							m_skillName = "清理巢穴",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("傲慢的凡人", merc_iter)?.m_id ?? -1,
							m_skillName = "傲慢的凡人",
						});
					}
					else if (merc_iter.m_name == "凯恩·血蹄")
					{
						List<MercCard> focusTargets = new List<MercCard>();

						//打绿色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						if (null != UtilsStra.FindSpecNameTarget("奥妮克希亚", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("坚韧光环", merc_iter)?.m_id ?? -1,
								m_skillName = "坚韧光环",
							});

							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("大地践踏", merc_iter)?.m_id ?? -1,
								m_skillName = "大地践踏",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("大地践踏", merc_iter)?.m_id ?? -1,
								m_skillName = "大地践踏",
							});
							if (targets_friendly_all.Count > 1)//如果有人需要加速
								list.Add(new BattleTarget()
								{
									m_skillId = UtilsStra.FindSkillForName("坚韧光环", merc_iter)?.m_id ?? -1,
									m_skillName = "坚韧光环",
								});
						}

						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("先祖勾拳", merc_iter)?.m_id ?? -1,
							m_skillName = "先祖勾拳",
						});

					}
					else if (merc_iter.m_name == "泰兰德·语风")
					{
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("奥术齐射", merc_iter)?.m_id ?? -1,
							m_skillName = "奥术齐射",
						});
					}
					else if (merc_iter.m_name == "米尔豪斯·法力风暴")
					{
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("魔爆术", merc_iter)?.m_id ?? -1,
							m_skillName = "魔爆术",
						});
					}
					else if (merc_iter.m_name == "穆克拉")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"梦魇毒蛇","安娜科德拉", "周卓","玛法里奥·怒风","古夫·符文图腾",
							"沃金","魔像师卡扎库斯","艾萨拉女王","恩佐斯","希尔瓦娜斯·风行者",
							"伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						focusTargets.Add(UtilsStra.FindMinHealthTarget(targets_opposite_valid));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("暴食香蕉", merc_iter)?.m_id ?? -1,
							m_skillName = "暴食香蕉",
						});
					}
					else if (merc_iter.m_name == "珑心")
					{

						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{
							"黄金猿","鞭笞者特里高雷","玉珑","冰雪之王洛克霍拉", "凯恩·血蹄" ,
							"伊莉斯·逐星","巫妖王","穆克拉"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("星火祝福", merc_iter)?.m_id ?? -1,
							m_skillName = "星火祝福",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("天神之息", merc_iter)?.m_id ?? -1,
							m_skillName = "天神之息",
						});
					}
					else if (
						merc_iter.m_name.IndexOf("龙人") == 0 ||
						merc_iter.m_name.IndexOf("奥妮克希亚雏龙") == 0 ||
						merc_iter.m_name.IndexOf("穆克拉的大表哥") == 0
						)
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"梦魇毒蛇","安娜科德拉", "周卓","玛法里奥·怒风",
							"沃金","魔像师卡扎库斯","艾萨拉女王","恩佐斯","希尔瓦娜斯·风行者",
							"伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						focusTargets.Add(UtilsStra.FindMinHealthTarget(targets_opposite_valid));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("攻击", merc_iter)?.m_id ?? -1,
							m_skillName = "攻击",
						});
					}
					//*********************************************王冰冰策略****************************************//
					else if (merc_iter.m_name == "冰雪之王洛克霍拉")
					{

						if (turn == 1 && (null != UtilsStra.FindMercenaryForName("鞭笞者特里高雷", targets_opposite_all)
							|| null != UtilsStra.FindMercenaryForName("冰雪之王洛克霍拉", targets_opposite_all)))
						{   //有蛇的局 王冰冰内战 2技能起手
							List<MercCard> focusTargets = new List<MercCard>();
							focusTargets.Add(UtilsStra.FindSpecNameTarget("鞭笞者特里高雷", targets_opposite_all));
							focusTargets.Add(UtilsStra.FindSpecNameTarget("冰雪之王洛克霍拉", targets_opposite_all));
							MercCard common_target = UtilsStra.GetTarget(focusTargets);
							list.Add(new BattleTarget()
							{
								m_oppoTarId = common_target?.m_id ?? -1,
								m_oppoTarName = common_target?.m_name ?? "",
								m_skillId = UtilsStra.FindSkillForName("冰霜震击", merc_iter)?.m_id ?? -1,
								m_skillName = "冰霜震击",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("冰雹", merc_iter)?.m_id ?? -1,
								m_skillName = "冰雹",
							});
						}
					}
					else if (merc_iter.m_name == "吉安娜·普罗德摩尔")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{
							"鞭笞者特里高雷","冰雪之王洛克霍拉","沃金","亚煞极","巫妖王", "玉珑","伊莉斯·逐星",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_all));
						}
						//打红色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("浮冰术", merc_iter)?.m_id ?? -1,
							m_skillName = "浮冰术",
						});
					}
					else if (merc_iter.m_name == "瓦尔登·晨拥")
					{
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("急速冰冻", merc_iter)?.m_id ?? -1,
							m_skillName = "急速冰冻",
						});
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("冰风暴", merc_iter)?.m_id ?? -1,
							m_skillName = "冰风暴",
						});
					}
					else if (merc_iter.m_name == "迪亚波罗")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("火焰践踏", merc_iter)?.m_id ?? -1,
							m_skillName = "火焰践踏",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("末日", merc_iter)?.m_id ?? -1,
							m_skillName = "末日",
						});
					}
					else if (merc_iter.m_name == "希奈丝特拉")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						focusTargets.Add(UtilsStra.FindMaxLossHealthTarget(targets_friendly));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("暮光灭绝", merc_iter)?.m_id ?? -1,
							m_skillName = "暮光灭绝",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("法力壁垒", merc_iter)?.m_id ?? -1,
							m_skillName = "法力壁垒",
						});
					}
					else if (merc_iter.m_name == "巴琳达·斯通赫尔斯")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						//打蓝色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("冰霜灼烧", merc_iter)?.m_id ?? -1,
							m_subSkillId = 0,
							m_skillName = "冰霜灼烧-0",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("冰霜之刺", merc_iter)?.m_id ?? -1,
							m_skillName = "冰霜之刺",
						});
					}
					else if (merc_iter.m_name == "阿莱克丝塔萨")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						//打绿色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.FIGHTER)));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("红龙女王的计策", merc_iter)?.m_id ?? -1,
							m_skillName = "红龙女王的计策",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("烈焰猛击", merc_iter)?.m_id ?? -1,
							m_skillName = "烈焰猛击",
						});
					}
					//*********************************************海盗队策略****************************************//
					else if (merc_iter.m_name == "伊莉斯·逐星")
					{

						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("黄金猿", merc_iter)?.m_id ?? -1,
							m_skillName = "黄金猿",
						});
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("开启任务", merc_iter)?.m_id ?? -1,
							m_skillName = "开启任务",
						});
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("躲避毒镖", merc_iter)?.m_id ?? -1,
							m_skillName = "躲避毒镖",
						});
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("丛林导航", merc_iter)?.m_id ?? -1,
							m_skillName = "丛林导航",
						});
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("指引道路", merc_iter)?.m_id ?? -1,
							m_skillName = "指引道路",
						});
					}
					else if (merc_iter.m_name == "提里奥·弗丁")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷", "伊莉斯·逐星", "吉安娜·普罗德摩尔", "冰雪之王洛克霍拉",
							"珑心", "米尔豪斯·法力风暴", "希尔瓦娜斯·风行者","娜塔莉·塞林",
							"沃金","克苏恩","周卓","玉珑","恩佐斯","闪狐"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打蓝色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("谦逊制裁", merc_iter)?.m_id ?? -1,
							m_skillName = "谦逊制裁",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("神圣突击", merc_iter)?.m_id ?? -1,
							m_skillName = "神圣突击",
						});
					}
					else if (merc_iter.m_name == "海盗帕奇斯")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "凯恩·血蹄", "鞭笞者特里高雷","冰雪之王洛克霍拉",
							"泰兰德·语风", "芬利爵士","沃金","玉珑","巫妖王"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);
						if (null != UtilsStra.FindMercenaryForName("黄金猿", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("全员开火", merc_iter)?.m_id ?? -1,
								m_skillName = "全员开火",
							});
						}
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("眼魔船长", merc_iter)?.m_id ?? -1,
							m_skillName = "眼魔船长",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("眼魔船工", merc_iter)?.m_id ?? -1,
							m_skillName = "眼魔船工",
						});
					}
					else if (merc_iter.m_name.IndexOf("小帕奇") == 0)
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{  "凯恩·血蹄", "鞭笞者特里高雷","冰雪之王洛克霍拉",
							"泰兰德·语风", "芬利爵士","沃金","玉珑","巫妖王"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("攻击", merc_iter)?.m_id ?? -1,
							m_skillName = "攻击",
						});
					}
					else if (merc_iter.m_name == "艾德温，迪菲亚首脑")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "吉安娜·普罗德摩尔", "冰雪之王洛克霍拉", "珑心", "米尔豪斯·法力风暴", "泰兰德·语风",
							"艾萨拉女王", "希尔瓦娜斯·风行者", "迪亚波罗","沃金" ,"希奈丝特拉",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打蓝色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);
						if (null != UtilsStra.FindMercenaryForName("黄金猿", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								m_oppoTarId = common_target?.m_id ?? -1,
								m_oppoTarName = common_target?.m_name ?? "",
								m_skillId = UtilsStra.FindSkillForName("首脑的悬赏", merc_iter)?.m_id ?? -1,
								m_skillName = "首脑的悬赏",
							});
						}
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("辅助打击", merc_iter)?.m_id ?? -1,
							m_skillName = "辅助打击",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("刺客之刃", merc_iter)?.m_id ?? -1,
							m_skillName = "刺客之刃",
						});
					}
					else if (merc_iter.m_name == "斯尼德")
					{
						MercCard common_target = (targets_opposite_valid.Count > 1) ? targets_opposite_valid[1] : targets_opposite_valid[0];
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("嗞啦", merc_iter)?.m_id ?? -1,
							m_skillName = "嗞啦",
						});
					}
					//*********************************************蛇龙周策略****************************************//
					else if (merc_iter.m_name == "安娜科德拉")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						focusTargets.Add(UtilsStra.FindSpecNameTarget("梦魇毒蛇", targets_friendly));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);
						if (null != UtilsStra.FindMercenaryForName("沃金", targets_opposite_all))
						{
							common_target = UtilsStra.FindMercenaryForName("沃金", targets_opposite_all);
							list.Add(new BattleTarget()
							{
								m_oppoTarId = common_target?.m_id ?? -1,
								m_oppoTarName = common_target?.m_name ?? "",
								m_skillId = UtilsStra.FindSkillForName("毒蛇噬咬", merc_iter)?.m_id ?? -1,
								m_skillName = "毒蛇噬咬",
							});
						}
						else if (null != UtilsStra.FindMercenaryForName("梦魇毒蛇", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								m_oppoTarId = common_target?.m_id ?? -1,
								m_oppoTarName = common_target?.m_name ?? "",
								m_targetType = TargetType_E.Friendly,
								m_skillId = UtilsStra.FindSkillForName("野兽恢复", merc_iter)?.m_id ?? -1,
								m_skillName = "野兽恢复",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("梦魇毒蛇", merc_iter)?.m_id ?? -1,
								m_skillName = "梦魇毒蛇",
							});
						}
					}
					else if (merc_iter.m_name.IndexOf("梦魇毒蛇") == 0
						|| merc_iter.m_name.IndexOf("猢狲捣蛋鬼") == 0
						|| merc_iter.m_name.IndexOf("蜥蜴人劫掠者") == 0)
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "变装大师","鞭笞者特里高雷", "冰雪之王洛克霍拉", "沃金","泰兰德·语风" , "伊莉斯·逐星",
							"魔像师卡扎库斯", "希尔瓦娜斯·风行者","艾萨拉女王",
							"火车王里诺艾","希奈丝特拉",  "芬利爵士", "艾德温·迪菲亚首脑","潮汐主母阿茜萨",
							"吉安娜·普罗德摩尔","迪亚波罗","米尔豪斯","珑心",
							"安娜科德拉","周卓","梦魇毒蛇",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("攻击", merc_iter)?.m_id ?? -1,
							m_skillName = "攻击",
						});
					}
					else if (merc_iter.m_name == "游学者周卓")
					{
						if (null != UtilsStra.FindMercenaryForName("沃金", targets_opposite_all)
							|| null != UtilsStra.FindMercenaryForName("冰雪之王洛克霍拉", targets_opposite_all))
						{
							if (null != UtilsStra.FindMercenaryForName("蜥蜴人劫掠者", targets_friendly_all))
							{
								list.Add(new BattleTarget()
								{
									m_skillId = UtilsStra.FindSkillForName("学识", merc_iter)?.m_id ?? -1,
									m_skillName = "学识-2",
									m_subSkillId = 2
								});
							}
							else
							{
								list.Add(new BattleTarget()
								{
									m_skillId = UtilsStra.FindSkillForName("耐心", merc_iter)?.m_id ?? -1,
									m_skillName = "耐心",
								});
							}
						}
						else
						{
							if (null != UtilsStra.FindMercenaryForName("猢狲捣蛋鬼", targets_friendly_all))
							{
								list.Add(new BattleTarget()
								{
									m_skillId = UtilsStra.FindSkillForName("学识-1", merc_iter)?.m_id ?? -1,
									m_skillName = "学识-1",
									m_subSkillId = 1
								});
							}
							else
							{
								list.Add(new BattleTarget()
								{
									m_skillId = UtilsStra.FindSkillForName("耐心", merc_iter)?.m_id ?? -1,
									m_skillName = "耐心",
								});
							}
						}

					}
					else if (merc_iter.m_name == "玛法里奥·怒风")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{    "鞭笞者特里高雷", "泰兰德·语风", "安娜科德拉", "游学者周卓",
							"梦魇毒蛇", "希奈丝特拉", "迪亚波罗", "希尔瓦娜斯·风行者"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打绿色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.FIGHTER)));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("大德鲁伊的召唤", merc_iter)?.m_id ?? -1,
							m_subSkillId = 1,
							m_skillName = "大德鲁伊的召唤-1",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("塞纳里奥波动", merc_iter)?.m_id ?? -1,
							m_skillName = "塞纳里奥波动",
						});
					}
					else if (merc_iter.m_name == "古夫·符文图腾")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{  "鞭笞者特里高雷", "冰雪之王洛克霍拉", "安娜科德拉",
							"游学者周卓", "梦魇毒蛇", "凯恩·血蹄", "巫妖王", "穆克拉"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("活体荆棘", merc_iter)?.m_id ?? -1,
							m_skillName = "活体荆棘",
						});
					}
					else if (merc_iter.m_name == "玉珑")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						//打绿色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.FIGHTER)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);
						if ((null != UtilsStra.FindMercenaryForName("玛法里奥·怒风", targets_friendly_all)
							|| null != UtilsStra.FindMercenaryForName("古夫·符文图腾", targets_friendly_all))
							&& turn >= 6)
						{
							list.Add(new BattleTarget()
							{
								m_oppoTarId = common_target?.m_id ?? -1,
								m_oppoTarName = common_target?.m_name ?? "",
								m_skillId = UtilsStra.FindSkillForName("氤氲之雾", merc_iter)?.m_id ?? -1,
								m_skillName = "氤氲之雾",
							});
							list.Add(new BattleTarget()
							{
								m_oppoTarId = common_target?.m_id ?? -1,
								m_oppoTarName = common_target?.m_name ?? "",
								m_skillId = UtilsStra.FindSkillForName("青玉劲风", merc_iter)?.m_id ?? -1,
								m_skillName = "青玉劲风",
							});
						}
						else if (targets_friendly_all.Count == 1)
						{
							list.Add(new BattleTarget()
							{
								m_oppoTarId = common_target?.m_id ?? -1,
								m_oppoTarName = common_target?.m_name ?? "",
								m_skillId = UtilsStra.FindSkillForName("青玉劲风", merc_iter)?.m_id ?? -1,
								m_skillName = "青玉劲风",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("玉火打击", merc_iter)?.m_id ?? -1,
								m_skillName = "玉火打击",
							});
						}
					}
					else if (merc_iter.m_name == "厨师曲奇")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(targets_opposite_valid));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("小鱼快冲", merc_iter)?.m_id ?? -1,
							m_skillName = "小鱼快冲",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("鱼类大餐", merc_iter)?.m_id ?? -1,
							m_skillName = "鱼类大餐",
						});
					}
					//*********************************************暗影队策略****************************************//
					else if (merc_iter.m_name == "希尔瓦娜斯·风行者")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "黄金猿", "沃金", "巴琳达·斯通赫尔斯","变装大师", "鞭笞者特里高雷", "伊莉斯·逐星", "嘉顿男爵",
							"冰雪之王洛克霍拉", "吉安娜·普罗德摩尔", "珑心", "米尔豪斯·法力风暴", "克苏恩",
							"希尔瓦娜斯·风行者","希奈丝特拉", "滑矛领主","游学者周卓","尤格-萨隆", "恩佐斯"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打蓝色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);
						if (merc_iter.m_curHealth > 56)
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("重拾灵魂", merc_iter)?.m_id ?? -1,
								m_skillName = "重拾灵魂",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								m_oppoTarId = common_target?.m_id ?? -1,
								m_oppoTarName = common_target?.m_name ?? "",
								m_skillId = UtilsStra.FindSkillForName("女妖之箭", merc_iter)?.m_id ?? -1,
								m_skillName = "女妖之箭",
							});
						}
					}
					else if (merc_iter.m_name == "艾萨拉女王")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "黄金猿","鞭笞者特里高雷","玉珑","冰雪之王洛克霍拉", "凯恩·血蹄" ,
							"伊莉斯·逐星","巫妖王","穆克拉"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						if (null != UtilsStra.FindMercenaryForName("沃金", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("法师巅峰", merc_iter)?.m_id ?? -1,
								m_skillName = "法师巅峰",
							});
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("傲人训诫", merc_iter)?.m_id ?? -1,
								m_skillName = "傲人训诫",
							});
						}
						else if (common_target == null)
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("傲人训诫", merc_iter)?.m_id ?? -1,
								m_skillName = "傲人训诫",
							});
						}
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("变换之潮", merc_iter)?.m_id ?? -1,
							m_skillName = "变换之潮",
						});
					}
					else if (merc_iter.m_name == "巫妖王")
					{

						if (null != UtilsStra.FindMercenaryForName("希尔瓦娜斯·风行者", targets_friendly_all) &&
							null != UtilsStra.FindMaxLossHealthTarget(targets_friendly))
						{
							List<MercCard> focusTargets = new List<MercCard>();
							focusTargets.Add(UtilsStra.FindMaxLossHealthTarget(targets_friendly));
							MercCard common_target = UtilsStra.GetTarget(focusTargets);
							list.Add(new BattleTarget()
							{
								m_oppoTarId = common_target?.m_id ?? -1,
								m_oppoTarName = common_target?.m_name ?? "",
								m_skillId = UtilsStra.FindSkillForName("凋零缠绕", merc_iter)?.m_id ?? -1,
								m_targetType = TargetType_E.Friendly,
								m_skillName = "凋零缠绕",
							});
						}
						else
						{
							List<MercCard> focusTargets = new List<MercCard>();
							string[] preKills = new string[]
							{
								"黄金猿", "泰兰德·语风", "迪亚波罗", "希奈丝特拉", "冰雪之王洛克霍拉"
							};
							for (int i = 0; i < preKills.Length; i++)
							{
								focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
							}
							//打绿色
							focusTargets.Add(UtilsStra.FindMinHealthTarget(
								targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.CASTER)));
							//打佣兵
							focusTargets.Add(UtilsStra.FindMinHealthTarget(
								targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

							MercCard common_target = UtilsStra.GetTarget(focusTargets);
							list.Add(new BattleTarget()
							{
								m_oppoTarId = common_target?.m_id ?? -1,
								m_oppoTarName = common_target?.m_name ?? "",
								m_skillId = UtilsStra.FindSkillForName("凋零缠绕", merc_iter)?.m_id ?? -1,
								m_skillName = "凋零缠绕",
							});
						}
					}
					else if (merc_iter.m_name == "沃金")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "黄金猿","鞭笞者特里高雷", "艾德温，迪菲亚首脑",
							"伊莉斯·逐星","冰雪之王洛克霍拉","希尔瓦娜斯·风行者","沃金",
							"玉珑", "周卓", "亚煞极","恩佐斯"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("暗影涌动", merc_iter)?.m_id ?? -1,
							m_skillName = "暗影涌动",
						});
						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("虚弱诅咒", merc_iter)?.m_id ?? -1,
							m_skillName = "虚弱诅咒",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("暗影震击", merc_iter)?.m_id ?? -1,
							m_skillName = "暗影震击",
						});
					}
					else if (merc_iter.m_name == "亚煞极")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						string[] preKills = new string[]
						{   "瓦莉拉·萨古纳尔","鞭笞者特里高雷",
							"安娜科德拉", "周卓","克苏恩",
							"沃金","艾萨拉女王","魔像师卡扎库斯","恩佐斯","希尔瓦娜斯·风行者",
							"艾德温，迪菲亚首脑","尤朵拉","伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(UtilsStra.FindSpecNameTarget(preKills[i], targets_opposite_all));
						}
						//打绿色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.FIGHTER)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));

						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						if (null != UtilsStra.FindMercenaryForName("希尔瓦娜斯·风行者", targets_friendly_all))
						{   //女王登场
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("无羁之怒", merc_iter)?.m_id ?? -1,
								m_skillName = "无羁之怒",
							});
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("亚煞极之力", merc_iter)?.m_id ?? -1,
								m_skillName = "亚煞极之力",
							});
						}
						else //其他情况的默认
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("无羁之怒", merc_iter)?.m_id ?? -1,
								m_skillName = "无羁之怒",
							});
							list.Add(new BattleTarget()
							{
								m_oppoTarId = common_target?.m_id ?? -1,
								m_oppoTarName = common_target?.m_name ?? "",
								m_skillId = UtilsStra.FindSkillForName("亵渎攻击", merc_iter)?.m_id ?? -1,
								m_skillName = "亵渎攻击",
							});
						}

					}
					//*********************************************暗影剑策略****************************************//
					else if (merc_iter.m_name == "剑圣萨穆罗")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						//打蓝色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("镜像", merc_iter)?.m_id ?? -1,
							m_skillName = "镜像",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("二连击", merc_iter)?.m_id ?? -1,
							m_skillName = "二连击",
						});
					}
					else if (merc_iter.m_name == "塔姆辛·罗姆")
					{
						List<MercCard> focusTargets = new List<MercCard>();
						//打红色
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(UtilsStra.FindMinHealthTarget(
							targets_opposite_valid.FindAll((MercCard t) => t.m_role != TAG_ROLE.NEUTRAL && t.m_role != TAG_ROLE.INVALID)));
						MercCard common_target = UtilsStra.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							m_skillId = UtilsStra.FindSkillForName("暗影之幕", merc_iter)?.m_id ?? -1,
							m_skillName = "暗影之幕",
						});
						list.Add(new BattleTarget()
						{
							m_oppoTarId = common_target?.m_id ?? -1,
							m_oppoTarName = common_target?.m_name ?? "",
							m_skillId = UtilsStra.FindSkillForName("暗影箭", merc_iter)?.m_id ?? -1,
							m_skillName = "暗影箭",
						});
					}
					else if (merc_iter.m_name == "魔像师卡扎库斯")
					{
						if (null != UtilsStra.FindMercenaryForName("沃金", targets_opposite_all))
						{   //敌方是暗影队
							if (turn < 3)
							{
								list.Add(new BattleTarget()
								{
									m_skillId = UtilsStra.FindSkillForName("构筑魔像", merc_iter)?.m_id ?? -1,
									m_subSkillId = 2,
									m_subSkillName = "构筑魔像-2",
								});
							}
							else
							{
								list.Add(new BattleTarget()
								{
									m_skillId = UtilsStra.FindSkillForName("暗影之爪", merc_iter)?.m_id ?? -1,
									m_skillName = "暗影之爪",
								});
							}
						}
						else if (null != UtilsStra.FindMercenaryForName("冰雪之王洛克霍拉", targets_opposite_all) ||
							null != UtilsStra.FindMercenaryForName("亚煞极", targets_friendly_all))
						{
							if (targets_friendly_all.Count == 5)
							{
								list.Add(new BattleTarget()
								{
									m_skillId = UtilsStra.FindSkillForName("构筑魔像", merc_iter)?.m_id ?? -1,
									m_subSkillId = 0,
									m_skillName = "构筑魔像-0",
								});
							}
							else
							{
								list.Add(new BattleTarget()
								{
									m_skillId = UtilsStra.FindSkillForName("构筑魔像", merc_iter)?.m_id ?? -1,
									m_subSkillId = 1,
									m_skillName = "构筑魔像-1",
								});
							}
						}
						else if (null != UtilsStra.FindMercenaryForName("沃金", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("构筑魔像", merc_iter)?.m_id ?? -1,
								m_subSkillId = 0,
								m_skillName = "构筑魔像-0",
							});
						}
						else if (null != UtilsStra.FindMercenaryForName("希尔瓦娜斯·风行者", targets_friendly_all)
							|| null != UtilsStra.FindMercenaryForName("鞭笞者特里高雷", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("构筑魔像", merc_iter)?.m_id ?? -1,
								m_subSkillId = 2,
								m_skillName = "构筑魔像-2",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								m_skillId = UtilsStra.FindSkillForName("暗影之爪", merc_iter)?.m_id ?? -1,
								m_skillName = "暗影之爪",
							});
						}
					}
					//*********************************************默认不动策略****************************************//

					else if (merc_iter.m_name.IndexOf("盔中寄居蟹") == 0 ||
						merc_iter.m_name.IndexOf("剑鱼") == 0 ||
						merc_iter.m_name.IndexOf("闪光翻车鱼") == 0||
						merc_iter.m_name.IndexOf("黄金猿") == 0)
					{
						list.Add(new BattleTarget()
						{
							m_frieTarName = merc_iter.m_name,
							m_bAllowOption = false,
						});
					}
				}
			}
			catch (Exception ex)
			{
				Console.WriteLine("空间名：" + ex.Source + "；" + '\n' +
					"方法名：" + ex.TargetSite + '\n' +
					"故障点：" + ex.StackTrace.Substring(ex.StackTrace.LastIndexOf("\\") + 1, ex.StackTrace.Length - ex.StackTrace.LastIndexOf("\\") - 1) + '\n' +
					"错误提示：" + ex.Message + '\n' +
					"XXX：" + ex.ToString()
					);
			}

			return list;
		}
	}
}

